package com.second.app.designpattern.observer.eventbus;

import com.google.common.eventbus.Subscribe;
import org.springframework.messaging.simp.annotation.SubscribeMapping;

/**
 * @Author GYZ
 * @Date 2023/11/10
 * <pre>
 *
 * </pre>
 */
public class RegPromotionObserver implements RegisterObserver{

    private IPromotionService promotionService;

    public RegPromotionObserver(IPromotionService promotionService){
        this.promotionService = promotionService;
    }
    @Subscribe
    @Override
    public void handleRegisterSuccess(Long userId) {
        promotionService.issueNewUserExperienceCash(userId);
    }
}
